import axios from '@/api/fetch';
import SERVER from '@/api/server';
import { status } from 'nprogress';
//
// // 实销信息查询
//
//
//
// // GET 导出 /vsSalesReport/searchReportForFactoryExcel
// export const exportExcel = (params) => axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/excel`, params, {
//   responseType: 'blob'
// });
//
// // export const exportExcel = (params) => axios.get(`${SERVER.RETAIL}/vsSalesReport/searchReportForFactoryExcel`, {
// //   params,
// //   responseType: 'arraybuffer'
// // })
//
//
//
// // GET 查询详情  /vsSalesReport/searchRetailOrderReportDataById
// export const audit = (params) => axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/updateStatus`,params)
//
// // 零售订单维护	查询销售顾问	sysmanage	 /employeeNew/getEmployees	get
// export const getEmployees = (params) => axios.get(`${SERVER.SYSMANAGE}/employeeNew/getEmployees`, {
//   params
// });
//
//
// // / 导出
// export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
//
//
//
// export const updateStatus = (Id,solidType) => axios.get(`${SERVER.WHOLESALES}/actualSalesDetail/deliveryStatus?actualSalesId=${Id}&solidType=${solidType}`)
//
//

// new add
// GET 查询列表 /vsSalesReport/searchReportForFactory
export const queryList = params => axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/queryList`, params);
// GET 查询详情  /vsSalesReport/searchRetailOrderReportDataById
export const getInfoById = (Id, solidType) => axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/detailQuery?actualSalesId=${Id}&solidType=${solidType}`);
// 获取省份
export const getAllProvince = () => axios.get(`${SERVER.midEndDictCenter}/dict/region/province`);
// 根据省RegionCode查询下级直属市 直属区县
export const queryRegionName = regionCode => axios.get(`${SERVER.midEndDictCenter}/dict/region/queryRegionName/${regionCode}`);
// 根据Code查询地区
export const queryRegionByCode = regionCode => axios.get(`${SERVER.midEndDictCenter}/dict/region/selectByCode/${regionCode}`);
// GET 导出
export const keyCustomerActualSalesExport = params =>
  axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/keyCustomerActualSalesExport`, params, {
    responseType: 'blob'
  });

export const keyCustomerupdateaudit = params => axios.post(`${SERVER.WHOLESALES}/actualSalesDetailAlteration/keyCustomerActualSalesEdit`, params);

// tabs 切换明细下拉
export const getFindAuditIdS = params => axios.get(`${SERVER.WHOLESALES}/actualSalesDetailAlteration/findAuditIdS`, { params });
// 切换明细详情

export const getFindAuditById = params => axios.get(`${SERVER.WHOLESALES}/actualSalesDetailAlteration/findAuditById`, { params });

export const bigCustomerSolidUpReport = (Id, solidType) => axios.get(`${SERVER.WHOLESALES}/actualSalesDetail/bigCustomerSolidUpReport?actualSalesId=${Id}&solidType=${solidType}`);


